fix(code_executors): send correct field names for sandbox input files#5958
fix(code_executors): send correct field names for sandbox input files#5958jordanchendev wants to merge 4 commits into
Conversation
AgentEngineSandboxCodeExecutor was sending 'contents' and 'mimeType' when the Agent Engine Sandbox API expects 'content' and 'mime_type'. This caused input files to be silently unreadable inside the sandbox, producing errors such as pandas.errors.EmptyDataError. Fixes google#3690
|
/adk-pr-analyze |
|
I will read the instructions for the You can also view the persistent artifact report directly at pr_5958_analysis.md. 🔍 ADK Pull Request Analysis: PR #5958Title: Executive Summary
Detailed Findings & Analysis1. Objectives & Impact ("What does it do?")
2. Justification & Value ("Is it a valid and useful change?")
3. Principle & Style Alignment Checklist ("Does it follow rules?")
Conclusion & RecommendationThe pull request is clean, correctly targeted, highly necessary, and fully compliant with ADK architectural guidelines. I recommend approving this PR directly. |
|
Hi @jordanchendev, Thank you for your contribution! We appreciate you taking the time to submit this pull request. Your PR has been received by the team and is currently under review. We will provide feedback as soon as we have an update to share. |
|
Hi @GWeale , can you please review this. |
Problem
AgentEngineSandboxCodeExecutorwas building the input-file payload withincorrect JSON field names:
contentscontentmimeTypemime_typeThis caused all input files to be silently unreadable inside the sandbox,
producing errors such as:
Fixes #3690
Changes
src/google/adk/code_executors/agent_engine_sandbox_code_executor.py— rename the two dict keys in theinput_data['files']list comprehension.tests/unittests/code_executors/test_agent_engine_sandbox_code_executor.py— add regression testtest_execute_code_sends_correct_field_names_for_input_filesthat verifies the correct keys are sent to the API.Testing plan
contentandmime_typeare used (was failing before the fix, passes after).pytest output
pre-commit